
import wx
import wx.aui
from wx import xrc
from CmdAssistPanel import CCommandAssistantPanel


class CContiToolFrame(wx.Frame):
    def __init__(self, parent):
        super(CContiToolFrame, self).__init__(parent)
        self.setup()

    def setup(self):
        self.nb = wx.aui.AuiNotebook(self)
        cmdPanel = CCommandAssistantPanel(self.nb)
        self.nb.AddPage(cmdPanel, "Command")


class CContiToolFrameXRC(CContiToolFrame):
    def __init__(self):
        pre = wx.PreFrame()
        self.PostCreate(pre)
        self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)

    def OnCreate(self, event):
        self.Unbind(wx.EVT_WINDOW_CREATE)
        wx.CallAfter(self.setup)
        event.Skip()
        return True
